import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)


const VueRouterPush = Router.prototype.push

Router.prototype.push = function push(to) {
  return VueRouterPush.call(this, to).catch(err => err)
}

export default new Router({
  routes: [
    {
      path: '/',
      name: 'login', //登录界面
      component: () => import('@/components/common/login')
    },
    {
      path: '/student',
      component: () => import('@/components/student/index'),
      children: [
        // { path: "/", component: () => import('@/components/student/myExam') },
        { path: '/', component: () => import('@/components/student/chaQuestion') },
        { path: '/echarts', component: () => import('@/components/student/Echarts') },
        { path: '/chaQuestion', component: () => import('@/components/student/chaQuestion') },
        { path: "/textCt", component: () => import('@/components/student/textCt') },
        // { path: '/startExam', component: () => import('@/components/student/startExam') },
        // { path: '/manager', component: () => import('@/components/student/manager') },
        // { path: '/examMsg', component: () => import('@/components/student/examMsg') },
        // { path: '/message', component: () => import('@/components/student/message') },
        // { path: '/studentScore', component: () => import("@/components/student/answerScore") },
        // { path: '/scoreTable', component: () => import("@/components/student/scoreTable") },
        // { path: '/fanyi', component: () => import('@/components/student/fanyi') },
        { path: '/textCt', component: () => import('@/components/student/textCt') },
        { path: '/ppt', component: () => import('@/components/student/ppt') },
        { path: '/diary', component: () => import('@/components/student/diary') },
        { path: '/textRewriting', component: () => import('@/components/student/TextRewriting') },
        { path: '/aiQuestion', component: () => import('@/components/student/aiQuestion') }, ,
      ]
    },
    // { path: '/answer', component: () => import('@/components/student/answer') }
  ]
})
